Page({
    data: {
        arr: [
            'https://www.zhaodui.com.cn/pic/swiper-01.png',
            'https://www.zhaodui.com.cn/pic/swiper-02.png',
            'https://www.zhaodui.com.cn/pic/swiper-03.png',
            'https://www.zhaodui.com.cn/pic/swiper-04.png'
        ],
        indicatorDots: false,
        autoplay: false,
        interval: 2000,
        duration: 500,
        width:'',
        height:''
    },
    onLoad: function (options) {
        var openId = wx.getStorageSync('openId');
        this.setData({
            openId: openId
        });
        this.getSystemInfo();
    },
    // 获取设备高度
    getSystemInfo: function () {
        var that = this;
        wx.getSystemInfo({
            success: function (e) {
                console.log(e);
                that.setData({
                    height: (e.screenHeight)-67,
                    width: e.screenWidth
                })
            }
        })
    },
    previewImage: function (e) {
        var current = e.target.dataset.src;
        wx.previewImage({
            current: current, // 当前显示图片的http链接
            urls: this.data.arr // 需要预览的图片http链接列表
        })
    },
})
